package org.apache.servicecomb.samples.practise.houserush.sale.service;

import org.apache.servicecomb.samples.practise.houserush.sale.entity.Favorite;
import org.apache.servicecomb.samples.practise.houserush.sale.entity.HouseOrder;
import org.apache.servicecomb.samples.practise.houserush.sale.entity.Sale;
import org.apache.servicecomb.samples.practise.houserush.sale.entity.SaleQualification;
import org.springframework.stereotype.Service;

import java.util.List;


public interface HouseOrderService {


    List<Sale> indexSales();

    Sale findSale(int saleId);

    List<Sale> findSaleByRealestateId(int realestateId);

    Sale createSale(Sale sale);

    Sale updateSale(Sale sale);

    void removeSale(int saleId);

    Sale findOrderSale(int saleId);

    void updateSaleQualification(List<SaleQualification> saleQualifications);

    void removeSaleQualification(int customerId);

    int countHouseBySaleId(int saleId);

    List<Favorite> findMyFavorite(int customerId);

    Favorite addFavorite(int customerId, int houseOrderId);

    Favorite findFavorite(int id);

    void removeFavorite(int id);

    HouseOrder findOne(int houseOrderId);

    HouseOrder findAllByHouseId(Integer houseId);

    List<HouseOrder> findAllByCustomerId(int cucustomerId);

    List<SaleQualification> findByCustomerId(int customerId);

    SaleQualification findBySaleIdAndCustomerId(int customerId, int saleId);


    HouseOrder placeHouseOrder(int customerId, int houseOrderId, int saleId, int orderId);

    HouseOrder cancelHouseOrder(int customerId, int houseOrderId, int orderId);
}
